/*
This file is part of project qttraylauncher.
*/

#ifndef DDPUSHBUTTON_H
#define DDPUSHBUTTON_H

#include <vector>
#include <QString>
#include <QPushButton>
#include <QDragEnterEvent>
#include <QMimeData>

#include <QComboBox>


struct config {
    int sizex, sizey, posx, posy;
    QString *command;
};

typedef struct config config_t;

class DDPushButton : public QPushButton
{
    Q_OBJECT

public:
    DDPushButton(const QString &caption);
    void setConfig(int sizex, int sizey, int posx, int posy, QString* command);
    void setDropable(bool dropable);
    void setHistory(QComboBox *cbHistory);


    int sizex, sizey, posx, posy;
    //QStringList *commands;
    std::vector<config_t*> configlist;
    QList<QUrl> data;
    QComboBox *cbHistory;

public:
    virtual void dragEnterEvent(QDragEnterEvent * event);
    virtual void dropEvent(QDropEvent * event);
};
#endif // DDPUSHBUTTON_H
